<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>node</title>
    <link rel="stylesheet" href="/public/main.css">
    <script src="/public/js/jq3.0.0.min.js"></script>
    <script src="/public/js/axios.min.js"></script>
    <script src="/public/js/public.js"></script>
</head>
<body>
<div class="main">


    <div class="blog-navigate">
        <div class="blog-container clear">
            <div class="row-item-s">
                    <span class="user-info" id="userName">
                        用户名：{{userinfo.username}}
                    </span>
                <span class="user-info" id="userId">
                        用户id：{{userinfo._id}}
                    </span>
                {% if userinfo.isAdmin %}
                <span class="user-info">
                        权限：管理员用户
                    </span>
                <div class="user-info-btn user-info">
                    <a href="/admin" class="btn-x">进入后台</a>
                </div>

                {% else %}
                <span class="user-info">
                        权限：普通用户
                    </span>
                {% endif %}
                <div class="user-info-btn">
                    <input type="button" class="btn-x" value="退出" id="login_out">
                </div>
            </div>
        </div>
    </div>


    <div class="blog-container">
        <div class="blog-header-box">
            {%if !category%}
            <a class="blog-header-item active" href="/">
                首页
            </a>
            {%else%}
            <a class="blog-header-item" href="/">
                首页
            </a>
            {%endif%}
            {% for item in typelist %}
            {%if category===item._id.toString()%}
            <a class="blog-header-item active" href="/?category={{item._id.toString()}}">
                {{item.name.toString()}}
            </a>
            {%else%}
            <a class="blog-header-item" href="/?category={{item._id.toString()}}">
                {{item.name.toString()}}
            </a>
            {%endif%}
            {% endfor %}
        </div>

        {%block content%}{%endblock%}
    </div>
</div>
</body>
</html>

